package com.caogen.cg_wl_kt.utils

import android.content.Context
import android.widget.Toast

/**
 * 项目名称: cg_wl_kt
 * Packages:com.caogen.cg_wl_kt.utils
 * author: FSW
 * 创建日期: 2024/2/29 14:37
 * Describe:
 *
 */
object Toasts {
    private var toast: Toast? = null

    fun toast(context: Context?, message: CharSequence?, time: Int = Toast.LENGTH_SHORT) {
        toast = Toast.makeText(context, message, time)
        toast?.show()
    }

    fun toast(context: Context?, ResId: Int, time: Int = Toast.LENGTH_SHORT) {
        toast(context, context?.getString(ResId), time)
    }

}